$(document).ready(function(){
	initFilterParams("schoolFilterInput", "schoolFilter", 6);
	initFilterParams("industryFilterInput", "industryFilter", 9);
	$("#profileSearchButton").click(function(event){
		$("#keyWords").val($("#searchWordsInput").val());
		$("#page").val("0");
		$("#frm").submit();
	});
	$("#filterButton").click(function(event){
		setFilterParams("schoolFilterInput", "schoolFilter", 6);
		setFilterParams("industryFilterInput", "industryFilter", 9);
		$("#page").val("0");
		$("#frm").submit();
	});
});
function setFilterParams(idinputprefix, idprefix, count){//
	var index = 1;
	for(index = 1; index <= count; index++){
		if($("#" + idinputprefix + index).attr("checked") == "checked"){
			$("#" + idprefix + index).val($("#" + idinputprefix + index).val());
		}else{
			$("#" + idprefix + index).val("");
		}
	}
}
function initFilterParams(idinputprefix, idprefix, count){
	var index = 1;
	for(index = 1; index <= count; index++){
		if($("#" + idprefix + index).val() != ""){
			$("#" + idinputprefix + index).attr("checked", "checked");
		}
	}
}
function bindPageLink(linkElementId, pageIndex){
	$("#" + linkElementId).click(function(event){
		$("#page").val(pageIndex);
		$("#frm").submit();
	});
}